Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Fixing issue #499 #502

Merged
merged 2 commits into from
Jul 29, 2014
Merged

Fixing issue #499 #502

merged 2 commits into from
Jul 29, 2014

Conversation

logie17
Copy link
Contributor

@logie17 logie17 commented Jul 29, 2014

  • Prior to version 1.4.1 the output of a macro could be assigned to a variable
    with "set" - this restores that bahavior.

* Prior to version 1.4.1 the output of a macro could be assigned to a variable
  with "set" - this restores that bahavior.
@@ -31,4 +31,8 @@ describe('Tag: macro', function () {
it('gh-457: local context is copied and overwritten within macro context', function () {
expect(swig.render('{% set foo = 1 %}{% set baz = 3 %}{% macro bar(foo) %}{{ foo }}{{ baz }}{% endmacro %}{{ bar(2) }}{{ foo }}')).to.equal('231');
});

it('a macro can be set to a variable', function () {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Mind prepending the testcase with gh-499: before this is merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, this should now be part of this PR.

paularmstrong added a commit that referenced this pull request Jul 29, 2014
Allow macro output to be assigned via `set` tag. Fixes gh-499
@paularmstrong paularmstrong merged commit 0d465ad into paularmstrong:master Jul 29, 2014
@paularmstrong
Copy link
Owner

Thanks @logie17!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants